package com.slz3.business.module.memberManagement.memJifen.steward;

import com.slz3.business.module.memberManagement.memJifen.domain.MemJifen;
import com.slz3.business.module.memberManagement.memJifen.domain.MemJifenCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemJifenResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MemJifen.class).flatMap(memJifen ->
                MemJifenResController.add(req, memJifen)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.delete(req, memJifenCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MemJifen.class).flatMap(memJifen ->
                MemJifenResController.modify(req, memJifen)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MemJifenResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MemJifenResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MemJifenResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.auditSubmit(req, memJifenCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.audit(req, memJifenCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.auditReject(req, memJifenCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.usingEnable(req, memJifenCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MemJifenCondition.class).flatMap(memJifenCondition ->
                MemJifenResController.usingDisable(req, memJifenCondition)
        );
    }   

}
